package main

import (
	"log"
	"gitee.com/ruoshuiqinmo/rabbitMQ-go/"
)

func main() {
	pub := rabbitMQ.NewRabbitMQRouting(rabbitMQ.MQURL, "order345")
	//argsQue := make(map[string]interface{})
	////添加死信队列交换器属性
	//argsQue["x-dead-letter-exchange"] = "dlx_exchange"
	////指定死信队列的路由key，不指定使用队列路由键
	////argsQue["x-dead-letter-routing-key"] = "zhe_mess"
	////添加过期时间
	//argsQue["x-message-ttl"] = 6000 //单位毫秒
	//pub.QueueArg = argsQue
	pub.RecieveRouting("blue", Print)
	//simple := lib..NewRabbitMQSimple("order1234")
	//simple.ConsumeSimple()
	defer pub.Destory()

}

func Print(message []byte) bool {
	//time.Sleep(6*time.Second)
	log.Printf("正常队列: %s", message)
	return true
}
